#ifndef __PEAR_CURL_H_
#define __PEAR_CURL_H_


#include <curl/curl.h>


// 
long pear_curl_cmd(char *method, char *url,  char *par, char *header[], char *body, long body_size, char *recvbuf, int recvbuf_len, int timeout);


//
long pear_curl_cmd_debug(char *method, char *url,  char *par, char *header[], char *body, long body_size, char *recvbuf, int recvbuf_len, int timeout);


//
long pear_curl_cmd_limit_speed(char *method, char *url, char *header[], curl_off_t recv_speed_bytes, int timeout);


// 4. url to memory
//
void pear_download_buffer(const char *method, const char *url, char *header[], char *body, long body_len, int connect_timeout, int total_timeout, char *buffer, long buffer_len);


// 5. url to file
//
size_t pear_download_file(const char *method, const char *url, char *header[], char *body, long body_len, long connect_timeout, long total_timeout, const char *path);


#endif

